import { lazy } from 'react'
import { WapHomeO, Records, ServiceO, UserCircleO } from '@react-vant/icons';
export let mainRouts = [
    {
        path: "/home/index",
        element: lazy(() => import('../page/home/Index')),
        icon: <WapHomeO />,
        title: "首页"

    },
    {
        path: "/home/cfig",
        element: lazy(() => import('../page/home/Cfig')),
        icon: <Records />,
        title: "订单"
    },
    {
        path: "/home/cart",
        element: lazy(() => import('../page/home/Cart')),
        icon: <ServiceO />,
        title: "客服"
    },
    {
        path: "/home/my",
        element: lazy(() => import('../page/home/My')),
        icon: <UserCircleO />,
        title: "我的"
    },
]
const routes = [
    {
        path: "/",
        to: '/home/index'
    },
    {
        path: "/home",
        element: lazy(() => import('../page/Home')),
        children: mainRouts
    },
    {
        path: "/login",
        element: lazy(() => import('../page/Login'))
    },
    {
        path: "/login2",
        element: lazy(() => import('../page/Login2'))
    },
    {
        path: "/detail",
        element: lazy(() => import('../page/Detail'))
    },
    {
        path: "/site",
        element: lazy(() => import('../page/Site'))
    },
    {
        path: "/site2",
        element: lazy(() => import('../page/Site2'))
    },
    {
        path: "/passenger",
        element: lazy(() => import('../page/Passenger'))
    },
    {
        path: "/np",
        element: lazy(() => import('../page/Np'))
    },
    {
        path: "/bianji",
        element: lazy(() => import('../page/Bianji'))
    },
    {
        path: "/od/:id",
        element: lazy(() => import('../page/Od'))
    },
    {
        path: "/querydata",
        element: lazy(() => import('../page/Querydata'))
    },
    {
        path: "/seat",
        element: lazy(() => import('../page/Seat'))
    },
    {
        path: "/ofg",
        element: lazy(() => import('../page/Ofg'))
    },
    {
        path: "/details",
        element: lazy(() => import('../page/Details'))
    },
    {
        path: "/zf",
        element: lazy(() => import('../page/Zf'))
    },
    {
        path: "*",
        element: lazy(() => import('../page/Error'))
    }
]
export default routes